#include <iostream>
#include "Interpolation.h"
#include <fstream>
using namespace std;

int main()
{

    vector<double> day{0.0,6.0,10.0,13.0,17.0,20.0,28.0};
    vector<double> Sp1{6.67,17.3,42.7,37.3,30.1,29.3,28.7};
    vector<double> Sp2{6.67,16.1,18.9,15.0,10.6,9.44,8.89};
    string poly_1,poly_2;
    vector<double> *p;

    Newton B;
    p =B.interpolation(day,Sp1);
    poly_1 = generate_poly_rat(*p, day);
    p =B.interpolation(day,Sp2);
    poly_2 = generate_poly_rat(*p, day);


    ofstream out;
    out.open("./date/E.polynomials", ios::out);
    out<<poly_1<<endl;
    out<<poly_2<<endl;
    out.close();
    return 0;
}
